# -*- encoding:utf-8 -*-

from taobao.response import TaobaoListResponse

class ItemsGetResponse(TaobaoListResponse):
    """ 调用 taobao.items.get 得到商品时 返回的response"""

    def __init__(self, rsp=None):
        """
            @ rsp : TaobaoListResponse
        """
        self.items = []
        super(ItemsGetResponse, self).__init__(rsp)
        
        self.setTaobaoObject(rsp.getTaobaoObject())
        self.setTotalResults(len(rsp.getTaobaoObject()))
        self.item = rsp.getTaobaoObject()
    
    def setItems(self, items):
        self.items = items

    def getItems(self):
        return self.items
